﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.echonest.api.v4;

namespace RequestEchoNest
{
    public class ArtistModel
    {
        internal Artist _artist;

        internal ArtistModel(Artist artist)
        {
            _artist = artist;
        }

        public string Id
        {
            get { return _artist.getID(); }
        }

        public string Name
        {
           get
           {
               return _artist.getName();
           }
        }

        public override string ToString()
        {
            return _artist.ToString();
        }

        public bool Equals(ArtistModel other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;
            return Equals(other._artist, _artist);
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            if (ReferenceEquals(this, obj)) return true;
            if (obj.GetType() != typeof (ArtistModel)) return false;
            return Equals((ArtistModel) obj);
        }

        public override int GetHashCode()
        {
            return (_artist != null ? _artist.GetHashCode() : 0);
        }
    }
}
